package com.jiangnan.warehouse_management.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.sql.Timestamp;

@Data
public class ItemResponse {
    private Integer itemId;
    private String itemName;
    private Integer categoryId;
    private CategoryDTO category;
    private String specification;
    private String unit;
    private Integer minimumStock;
    private Integer maximumStock;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Timestamp createdAt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Timestamp updatedAt;

    @Data
    public static class CategoryDTO {
        private Integer categoryId;
        private String categoryName;
    }
}